Computer-readable recording medium storing data processing program, server apparatus, and data processing method

ABSTRACT

A computer-readable recording medium storing a data processing program that causes a computer of a group of mutually communicable computers to execute, an acquisition procedure configured, when a processing request for an arbitrary data is inputted, to acquire the number of replicas set in the arbitrary data, a selection procedure configured to select computers, which serve as arrangement destinations of the arbitrary data and are as many as the number of replicas, from the computers of the computer group by using a predetermined algorithm, a transmission procedure of the number of replicas, configured to transmit the number of replicas of the arbitrary data, which number is acquired by the acquisition procedure, to all the computers of the computer group, and a processing request transmission procedure configured to transmit the processing request to each the computers that are selected by the selection procedure and as many as the number of replicas.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of theprior Japanese Patent Application No.2008-319530, filed on Dec. 16,2008, the entire contents of which are incorporated herein by reference.

BACKGROUND

1. Field

Various embodiments relate to a computer-readable medium storing a dataprocessing program in each computer that constitutes a group ofcomputers capable of communicating with each other, and relates to aserver apparatus and a data processing method.

2. Description of the Related Art

In recent years, in a database system that is accessible via a networksystem, according to an increase in amount of data to be arranged, andan increase in access to the data, there has been an increase in theconfiguration in which the data are managed by being distributed in aplurality of apparatuses, such as servers and other storages(hereinafter collectively referred to as “server apparatus”). In thecase in which data are distributed and arranged in this way, theredundancy is provided in many cases for load distribution andavailability improvement in such a manner that replicas (duplicates) ofone data are generated so as to be respectively arranged in a pluralityof servers.

The total number of replicas, including the source data and the datagenerated at this time, is referred to as the number of replicas.Usually, the number of replicas is determined according to an accesspattern to the data, and the like. For example, in the case where alldata are only referred to, all the data are copied in all the serverapparatuses in which the data are to be arranged. That is, the number ofreplicas is equal to the number of the server apparatuses. There are thefollowing advantages in such distribution of data.

Data are arranged in all the server apparatuses, and hence theprocessing load due to reference requests from clients can be easilydistributed by preparing a load balancer that is simply configured so asto distribute each of the reference requests to one of the serverapparatuses.

Even when reference requests to the same data are issued from aplurality of clients, the reference requests can be distributed incorrespondence with the number of servers.

Availability is high because data are not lost unless all the serverapparatuses are down.

On the other hand, in the case where data are not only referred to butalso updated, and where the data are copied in all the serverapparatuses as described above, the update of data needs to be reflectedin all the server apparatuses each time the update of data is performed.As a result, the copy processing is frequently generated in each of theserver apparatuses, so that the processing efficiency is lowered.Further, even in the case in which the data are updated, when the numberof replicas is set to 1 (no copy state) in order to maximize theprocessing efficiency of each of the server apparatuses, and when thereference requests are concentrated on the same data, there may be acase where the load distribution cannot be performed and, thereby, theresponse time to the reference request is increased. Further, other thanthe server apparatus with the data arranged therein, a standby serverapparatus with the same data arranged therein is not prepared, and hencethere is a possibility that when the server apparatus is down, the datais lost. As a result, the availability is also significantly reduced.

Therefore, in many conventional cases, the number of replicas is set toa value that is two or more, and which is less than the total number ofthe server apparatuses. In practice, the number of replicas isdetermined in consideration of satisfying the access pattern(reference/update ratio and frequency) of data and the availabilityrequired by the manager and user of the database. Thereby, data accessin both reference and update can be efficiently performed. (JapanesePatent Application Laid-Open Publication No. 2-231676).

SUMMARY

A computer-readable recording medium storing a data processing programthat causes a computer of a group of mutually communicable computers toexecute, an acquisition procedure configured, when a processing requestfor an arbitrary data is inputted, to acquire a number of replicas setin the arbitrary data, a selection procedure configured to selectcomputers, which serve as arrangement destinations of the arbitrary dataand are as many as the number of replicas, from the computers of thecomputer group by using a predetermined algorithm, a transmissionprocedure of the number of replicas, configured to transmit the numberof replicas of the arbitrary data, which number is acquired by theacquisition procedure, to all the computers of the computer group and aprocessing request transmission procedure configured to transmit theprocessing request to each of the computers that are selected by theselection procedure and as many as the number of replicas.

A server apparatus that is a computer and constitutes a server apparatusgroup capable of communicating with each other, the server apparatusincluding an acquisition unit configured, when a processing request foran arbitrary data is inputted, to acquire a number of replicas set inthe arbitrary data, a selection unit configured to select serverapparatuses, which serve as arrangement destinations of the arbitrarydata and are as many as the number of replicas, from the serverapparatuses of the server apparatus group by using a predeterminedalgorithm, a transmission unit of the number of replicas, configured totransmit the number of replicas of the arbitrary data, the number beingacquired by the acquisition unit, to all the server apparatuses of theserver apparatus group, a processing request transmission unitconfigured to transmit the processing request to each of the serverapparatuses that are selected by the selection unit and as many as thenumber of replicas, an execution unit configured, when the processingrequest transmitted from the server apparatus itself or another serverapparatus is received, to execute processing corresponding to theprocessing request, and a determination unit configured to determine ateach arbitrary time the number of replicas of the arbitrary data byreferring to the processing request for the arbitrary data, whichprocessing request is executed by the execution unit. When the number ofreplicas different from the currently set number of replicas isdetermined by the determination unit, the transmission unit of thenumber of replicas transmits the determined number of replicas to allthe server apparatuses of the server apparatus group. When thedetermined number of replicas is transmitted by the transmission unit ofthe number of replicas, the selection unit newly selects the serverapparatuses, in which the arbitrary data is to be arranged and which areas many as the determined number of replicas, from the serverapparatuses of the server apparatus group according to a predeterminedalgorithm. When the server apparatus itself is selected by the selectionunit as the server apparatus with the arbitrary data to be newlyarranged therein, the execution unit performs the writing of thearbitrary data. When the server apparatus itself is no longer selectedby the selection unit as the server apparatus with the arbitrary data tobe newly arranged therein, the execution unit erases the data.

The object and advantages will be realized and attained by means of theelements and combinations particularly pointed out in the claims. It isto be understood that both the foregoing general description and thefollowing detailed description are exemplary and explanatory and are notrestrictive of the invention, as claimed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is an illustration showing a system configuration of serverapparatuses according to an embodiment;

FIG. 2 is a block diagram showing a hardware configuration of the serverapparatus according to an embodiment;

FIG. 3 is a block diagram showing a functional configuration of a linkprocessing section;

FIG. 4 is an illustration showing data update processing in the serverapparatus;

FIG. 5 is a flow chart showing a procedure of an arrangement serverselection processing;

FIG. 6A is a flow chart showing a procedure of data update processing(in the case of the server apparatus which has received an updaterequest from an application execution section of the server apparatusitself;

FIG. 6B is a flow chart showing a procedure of data update processing(in the case of the server apparatus which has received an updaterequest from a link processing section of another server apparatus);

FIG. 7 is an illustration showing data reference processing in theserver apparatus;

FIG. 8A is a flow chart showing a procedure of data reference processing(in the case of the server apparatus which has received a referencerequest from the application execution section of the server apparatusitself);

FIG. 8B is a flow chart showing a procedure of data reference processing(in the case of the server apparatus which has received a referencerequest from the link processing section of another server apparatus);

FIG. 9 is a flow chart showing data rearrangement processing at the timewhen the number of replicas is changed;

FIG. 10 is a flow chart showing data rearrangement processing at thetime when the number of replicas is increased;

FIG. 11 is a flow chart showing data rearrangement processing at thetime when the number of replicas is reduced;

FIG. 12 is an illustration showing a latency calculation procedure atthe time of data update; and

FIG. 13 is an illustration showing a latency calculation procedure atthe time of data reference.

DESCRIPTION OF EMBODIMENTS

As described above, in the case in which the access pattern to each ofdata arranged in the server apparatuses used as the data distributiontype database system is significantly different for each of the data, itis difficult to determine the optimum number of replicas common to allthe data. For example, in the case where the number of replicas (commonto all the data) is set higher, the reference efficiency to the datawith a high reference frequency is increased. However, the data with ahigh update frequency needs to be updated in correspondence with thenumber of replicas, so that the processing efficiency in the case ofupdate is lowered.

As a measure to cope with such case, there is also proposed a techniquein which the data are classified into data with a high referencefrequency and data with a high update frequency, and in which theclassified data, each having the number of replicas set thereto, arearranged in each of the server apparatuses. However, in the case wherethe data cannot be classified by the access pattern difference, such asthe case that a method for classifying the data is applied by the ownerof the data, only an average value can be set as the number of replicas.

Further, even if the data can be divided on the basis of access patternsat a certain point of time so that the different number of replicas canbe set in correspondence with each of the access patterns, when theaccess patterns are frequently changed, it is difficult to always applythe optimum number of replicas. For example, in the case of a service,such as a blog, in which update processing of the database is mainlyperformed by general users other than the manager of the serverapparatus, the update frequency of a blog article of a user is changedby reason of the user, and the reference frequency to a page of acertain user is rapidly increased by a news report, the occurrence of anevent, and the like. Therefore, there is an issue that when the numberof replicas remains fixed, the data access efficiency is lowered so asto make it difficult for a referring person to conveniently refer to thedata.

Thus, there is also proposed a technique in which in the datadistribution type database system, the reference frequency of data ismonitored, and in which, as a result of comparison between the referencefrequency and a preset reference value (for example, when the referencefrequency exceeds the reference value, or when the reference frequencyis expected to exceed the reference value), a part or all of the data iscopied and transmitted to another site. According to this technique, thereference efficiency can be increased by copying the replica to the sitewith a high reference frequency. Further, the data are dynamicallycopied, and hence it is possible to efficiently cope with a change inthe tendency of database processing.

However, in the above described technique, only the copying of data isdescribed. Thus, when this technique continues to be used in anenvironment in which the change in data access is large, all the dataare copied to all the sites after a certain time period unless the datacopy destination is restricted. Therefore, there is a issue that whenthe reference frequency of a certain data is reduced and when the updatefrequency of the data is increased, the effect of the reference loaddistribution is reduced, and the update efficiency is on the contrarylowered by an extent corresponding to the increase in the number ofcopies.

In order to solve the issues described above, an object in one aspect isto provide a storage medium that stores a data processing programcapable of dynamically determining the number of replicas of each data,and making data processing efficiently performed in each of serverapparatuses, and to provide the server apparatus and the data processingmethod.

In the following, embodiments of the data processing program, the serverapparatus, and the data processing method will be described in detailwith reference to the accompanying drawings. In the data processingprogram, the server apparatus, and the data processing method, there isset, for each data, the number of replicas representing the number ofserver apparatuses in which the data is replicated, and on the basis ofthe number of replicas, there are selected the server apparatuses inwhich the replicated data is to be arranged. Then, each time the numberof replicas is dynamically changed, the server apparatuses with the datato be arranged therein are selected again by each of the serverapparatuses. When the number of replicas is increased, the correspondingdata is newly arranged in the server apparatus that is newly added asthe data arrangement destination. On the other hand, when the number ofreplicas is reduced, the corresponding data is erased in the serverapparatus that is excluded from the data arrangement destination.

That is, the server apparatuses with the data arranged therein can bedynamically increased or decreased according to the change in the numberof replicas. Therefore, it is possible to solve the conventionallyexperienced issues that the response time is increased due to theconcentration of reference requests from clients, and that since inspite of the high update frequency, the number of the server apparatuseswith the same data arranged therein is large, each of the serverapparatuses is pressed to perform the update processing and, thereby,the processing efficiency is lowered. In the following, there will bespecifically described the best mode for realizing the above describeddata processing.

(Outline of Data Processing)

First, there will be described an outline of data processing accordingto the present embodiment. FIG. 1 is an illustration showing a systemconfiguration of server apparatuses according to the present embodiment.As shown in FIG. 1, in the present embodiment, a data distributionsystem 200 is realized by distributing and arranging data in a group ofserver apparatuses 100 that have the same configuration. The datadistributed in the data distribution system 200 includes weblogarticles, a common database, and the like, and is not particularlylimited. Therefore, as long as the system is configured to handle datapresumed to be subjected to reference processing and update processingfrom a plurality of users, the system can be adapted to variousapplications.

Further, a load balancer 110 that receives a request 120 representing aprocessing request from a user is connected to the data distributionsystem 200. The load balancer 110 assigns the request 120 received fromthe outside to any of the server apparatuses 100-1 to 100-n, which arecurrently prepared in the data distribution system 200.

When the request 120 is assigned to the server apparatus 100 from theload balancer 110, the server apparatus 100 performs the data processingrequested by the request 120 by making an application execution section101 execute an application (application corresponding to the contents ofthe request 120). Specifically, the data processing in the serverapparatus 100 is configured, as will be described below, by two kinds ofprocessing that correspond to object data update processing and objectdata reference processing.

<Data Update Processing>

The data update processing is processing in which the contents of theobject data designated by the request 120 are changed, and is classifiedinto three kinds of processing that correspond to new write processing,existing data update processing, and existing data erase processing.

<Data Reference Processing>

The data reference processing is processing in which the contents of theobject data designated by the request 120 are not changed, andcorresponds to existing data read processing.

Note that the request 120 described in the present embodiment isconstituted of the information for identifying what kind of the dataprocessing described above is requested, and the information aboutobject data. For example, the configuration of the request 120 at thetime of data update and the configuration of the request 120 at the timeof data reference are described as follows.

Request at the Time of Update

Request example 1: new write

Kind of access: update (creation of new file)

Data information: new data (name of file to be newly created andcontents to be written)

Request example 2: update of existing data

Kind of access: update (overwriting of file)

Data information: data to be updated (name of file to be overwritten andcontents to be overwritten)

Request example 3: erase of existing data

Kind of access: update (erase of file)

Data information: data to be erased (name of file to be erased)

Request at the Time of Reference

Request example 4: read of existing data

Kind of access: reference (read of file contents)

Data information: data to be read (name of file to be read)

Further, in the case of the present embodiment, each of the serverapparatuses 100 configuring the data distribution system 200 can realizethe following functions by including a link processing section 102.

1) The server apparatus 100 that has received the request 120 of(reference and update) access to object data from the outside, such as aclient, transmits the received request 120 to the server apparatus 100in which the data to be processed is arranged. At this time, when thedata to be processed is arranged in the server apparatus 100 havingreceived the request, the server apparatus 100 transmits the request toitself. Further, when the object data is arranged in another serverapparatus 100, the server apparatus 100 transmits the request to theserver apparatus 100. Note that when the request 120 is the updateprocessing request, the request includes therein contents of data to benewly written or contents of update data.

2) The server apparatus 100, in which respective data to be subjected todata processing are arranged, monitors data access patterns(reference/update ratio and frequency), and periodically determines thenumber of replicas for each of the data.

3) When the number of replicas is changed, the server apparatus 100, inwhich any of the data is arranged, transmits the information on thechange to the other server apparatuses.

4) When receiving the information on the change of the number ofreplicas of a certain data, the server apparatus 100 with any of thedata arranged therein specifies the arrangement destination of thecertain data on the basis of the changed number of replicas. When thenumber of replicas is increased, the server apparatus 100 determines, byusing a predetermined rule, a transmission source server that transmitsthe replicas corresponding to the increase in number of replicas. Whenthe server apparatus 100 itself is the transmission source server, theserver apparatus 100 copies the replicas of the data in new arrangementdestinations. When the number of replicas is reduced, and when theserver apparatus 100 itself is excluded from the arrangementdestination, the server apparatus 100 erases the data.

The function of the server apparatus 100 according to the presentembodiment is particularly featured by the function 1) described above.As shown in FIG. 1, the request 120 of processing for the data arrangedin the data distribution system 200 (data desired to be newly arrangedin the case of new write request) is transmitted to any of the serverapparatuses 100 configuring the data distribution system 200 via theload balancer 110. At this time, on the basis of the number of replicasset in the object data of the request 120, the server apparatus 100 withthe request 120 assigned thereto selects the server apparatuses 100 withthe object data arranged therein.

As shown in FIG. 1, when the data distribution system 200 is constitutedof the n server apparatuses 100, the object data with the number ofreplicas set to 3 is arranged in the three server apparatuses 100 (forexample, server apparatuses 100-1, 100-2 and 100-n). Therefore, when oneof the three server apparatuses 100-1, 100-2 and 100-n receives, as therequest 120, the update request of the object data, the update requestis transmitted to all the three server apparatuses 100-1,100-2 and 100-nin each of which the object data is arranged.

On the other hand, when one of server apparatuses 100 receives, as therequest 120, a reference request for the object data, the referencerequest is transmitted to one of the three server apparatuses 100-1,100-2 and 100-n. The server apparatus 100 having received the referencerequest refers to the object data arranged therein, and returns thereference result to the server apparatus 100 having received the request120. In this way, in the data distribution system 200, the bidirectionalcommunication for processing the request is performed between the serverapparatuses 100. The bidirectional communication is directly performedby the link processing section 102 (as will be described below) includedin the server apparatus 100.

As described above, in the present embodiment, each of the object datais distributed and arranged in any of the plurality of serverapparatuses 100 prepared on the basis of the number of replicas. At thistime, the number of distributed server apparatuses is equal to thenumber of replicas. Further, the number of replicas is periodicallycalculated while the state of data access from clients is monitored.Then, the data arrangement destinations are again determined on thebasis of the newly calculated number of replicas. Therefore, even in theenvironment in which the access pattern is frequently changed, theoptimum number of replicas is always applied in correspondence with thechange. Thereby, the performance as the data distribution system 200,and the convenience of the user who transmits the request 120 to theobject data and of the manager of the data distribution system 200 canbe maintained to a fixed level.

In the conventional technique, in the case where a manual change of thenumber of replicas is desired to be avoided after the start of operationof the system, it is necessary that the access pattern to each of thedata is analyzed in detail beforehand, so as to determine the number ofreplicas. In the present embodiment, each of the server apparatuses 100is able to dynamically change the contents of data arrangement accordingto the number of replicas, and hence the number of replicas can bedynamically changed even during operation of each of the serverapparatuses 100. Therefore, even when the number of replicas isdetermined without previous detailed analysis, the number of replicas ischanged while actual data are analyzed. Thereby, it is possible toeventually apply the optimum number of replicas.

Further, in the case in which the number of replicas is determined bythe previous analysis, as in the conventional technique, a predictedvalue may be applied because the data during the actual operation cannotbe used. In many cases, the predicted value is significantly differentfrom the actual state value. This may result in a case where, even whenthe detailed analysis is performed, the analysis result cannot serve tomaintain the efficiency of the server apparatus 100, so as to becomemeaningless. In the server apparatus 100 according to the presentembodiment, even when the default number of replicas is not suitable, itis possible to eventually apply the optimum number of replicas.

(System Configuration)

Next, there will be described a system configuration of a serverapparatus that realizes the data processing as described above. As shownin FIG. 1, the access to the data distribution system 200 is performedvia the load balancer 110. The load balancer 110 collectively receivesthe request 120 inputted by the user using a client terminal, andtransmits the received data and processing request to any of the serverapparatuses 100 configuring the data distribution system 200.

The load balancer 110 is not particularly limited in the operation toassign the data and the processing request. For example, the loadbalancer 110 may successively assign the received data and processingrequests in the order of the apparatus number of the server apparatus100, or may assign at random the received data and processing requestsother than the server apparatus 100 in a busy state while monitoring theoperation state of the respective server apparatuses 100.

Next, there will be described a configuration of each of the serverapparatuses configuring the data distribution system 200. Each of theserver apparatuses 100 is configured by including the applicationexecution section 101, the link processing section 102, and a storagesection 103. Further, an application, which is executed by theapplication execution section 101 at the time when an access is made toeach data, is set so as to operate on all the server apparatuses 100 inwhich the corresponding data is arranged. The storage section 103 is arecording area in which data are actually arranged, and is realized byvarious memories and a disk. A known technique is used for theprocessing to actually write the data in the storage section 103, andhence the description thereof is omitted here.

The server apparatus 100 according to the present embodiment is featuredby the link processing section 102. When the request 120 is newlyassigned by the load balancer 110, the application execution section 101converts the inputted request 120 to the processing (request) toactually access the data, and transmits the request to the linkprocessing section 102 of its own server apparatus 100. Thus, whenreceiving the request 120, the link processing section 102 selectsserver apparatuses (hereinafter referred to as “arrangement servers”) inwhich the data is to be arranged, according to the number of replicasset in the object data included in the request 120, and transmits therequest 120 to the link processing section 102 of the selected serverapparatuses 100.

Further, in the case in which the number of replicas is set for a newlyinputted data, or in which the number of replicas for a certain data isupdated by the function as will be described below, the link processingsection 102 transmits the number of replicas corresponding to the datato each of the server apparatuses 100 together with information (forexample, the file name including the data contents) for identifying thedata. In this way, the information on the number of replicas set foreach of the data is held by the link processing section 102. Thereby,even when the request 120 for any of the data is assigned to the serverapparatus 100, the server apparatus 100 can specify the arrangementserver of the object data, so as to make suitable processing performed.

(Hardware Configuration of Server Apparatus)

Next, there will be described a specific hardware configuration of aserver apparatus. FIG. 2 is a block diagram showing a hardwareconfiguration of a server apparatus according to the present embodiment.In FIG. 2, the server apparatus 100 includes a CPU (Central ProcessingUnit) 201, a ROM (Read-Only Memory) 202, a RAM (Random Access Memory)203, a magnetic disk drive 204, a magnetic disk 205, a communication I/F(Interface) 206, an input device 207, and an output device 208. Further,the respective component sections are connected to each other by a bus210.

Here, the CPU 201 performs overall control of the server apparatus 100.The ROM 202 stores various programs, such as a boot program, and a dataprocessing program for realizing the data processing according to thepresent embodiment. The RAM 203 is used as a work area of the CPU 201.According to the control by the CPU 201, the magnetic disk drive 204controls the data update and reference performed to the magnetic disk205. The magnetic disk 205 stores the data written under the control ofthe magnetic disk drive 204. Note that in the hardware configurationshown in FIG. 2, the magnetic disk 205 is used as a recording mediumserving as the storage section 103, but other recording media, such asan optical disk and a flash memory, may also be used.

The communication I/F 206 is connected to a network (NET) 209, such as aLAN (Local Area Network), a WAN (Wide Area Network), and the Internet,through a communication line, and is connected to the other serverapparatuses 100 and load balancers 110 via the network 209. Thecommunication I/F 206 serves as an interface between the network 209 andthe inside, and performs control of the input and output of data fromand to the external apparatus. As a configuration example of thecommunication I/F 206, it is possible to adopt, for example, a modem, aLAN adapter, and the like.

The input device 207 receives an input to the server apparatus 100 fromthe outside. As the input device 207, there are specifically listed akeyboard, a mouse, and the like. Note that the server apparatus 100 asexemplified in FIG. 1 executes an application according to the request120 assigned by the load balancer 110, and hence does not receive therequest 120 from the input device 207. The input device 207 is providedfor the purpose of the maintenance and management of the serverapparatus 100.

In the case in which the keyboard is used as the input device 207, thekeyboard includes, for example, keys for input of a character, a number,and various instructions, and the like, and is used to input the data.Further, the input device 207 may be a touch panel type input pad, aten-key, and the like. In the case where the mouse is used as the inputdevice 207, the mouse is used, for example, for moving a cursor andselecting a movement range of the cursor, or for moving a window andchanging the size of the window. Further, a trackball, a joystick, orthe like, may also be used as the input device 207, as long as they havesimilar functions as a pointing device.

The output device 208 outputs data arranged in the server apparatus 100,and an application execution state, and further outputs an accesspattern of each of the arranged data, the analysis result of the accesspattern, and the like. Specifically, as the output device 208, there arelisted a display, a printer, and the like.

In the case in which the display is used as the output device 208, thedisplay displays, for example, not only a cursor, an icon, or a toolbox,but also data of a document, an image, functional information, and thelike. As the display, there may also be adopted a CRT, a TFT liquidcrystal display, a plasma display, and the like. Further, in the case inwhich the printer is used as the output device 208, the printer performsthe printing of, for example, image data and document data. Further, asthe printer, there may also be used a laser printer and an ink-jetprinter.

Note that the input device 207 and the output device 208, as describedabove, are not essential components for the function of the serverapparatus 100, and may be suitably changed according to the convenienceof the manager.

(Functional Configuration of Link Processing Section)

Next, there will be described in detail the processing performed by thelink processing section 102. As described with reference to FIG. 1, thelink processing sections 102 of the respective server apparatuses 100are capable of performing bidirectional communication with each other.When a request 120 for a certain data is assigned, the transmission andreception of the request 120 (the kind of processing, information foridentifying data, and contents of the data) are performed by the controlof the link processing section 102, as will be described below. Further,when the number of replicas for a certain data is newly determined orchanged, the transmission and reception of the information on the newnumber of replicas (information for identifying the data, the datacontents, and the new number of replicas) are performed.

Therefore, in the following, there will be described a functionalconfiguration to enable the link processing section 102 of the serverapparatus 100 according to the present embodiment to realize the abovedescribed control. FIG. 3 is a block diagram showing a functionalconfiguration of the link processing section. As shown in FIG. 3, thelink processing section 102 includes an acquisition section 301, aselection section 302, a transmission and reception section 303, asetting section 304, a decision section 305, an execution section 306,and a determination section 307. The functions (of the acquisitionsection 301 to the determination section 307) serving as a controlsection can be specifically realized by making the CPU 201 executeprograms stored, for example, in storage areas in the ROM 202 and theRAM 203, and the magnetic disk 205, which are shown in FIG. 2, or can berealized via the I/F 206.

When the request 120 is inputted as a processing request for anarbitrary data, the acquisition section 301 acquires the number ofreplicas set in the data. As described above, in the case in which thedata is already arranged in the storage section 103 of any of the serverapparatuses 100 configuring the data distribution system 200, theinformation on the number of replicas of the data is stored in all ofthe server apparatuses 100. Therefore, the acquisition section 301acquires the number of replicas set in the object data of the inputtedrequest 120. The number of replicas acquired by the acquisition section301 and the correspondence information between the number of replicasand the data are respectively stored in a storage area, such as in thestorage section 103 (for example, the magnetic disk 305).

From the server apparatuses 100 configuring the data distribution system200, the selection section 302 selects, by using a predeterminedalgorithm, the server apparatuses 100 in which the object data of therequest 120 is arranged and which are as many as the number of replicas.Note that the algorithm used as a standard of the selection is notparticularly limited here. For example, there may be used a method inwhich a hash value of the inputted data is obtained, and in which theserver apparatuses 100 as many as the number of replicas are selected,as the arrangement servers, in order from the server apparatus 100 whoseapparatus number coincides with the remainder obtained by dividing thehash value by the number of server apparatuses.

In addition, in the case in which there are N server apparatuses 100,there may also be used a method in which the identification number ofthe inputted data is converted into an N-digit number, and in which theserver apparatuses 100 as many as the number of replicas are selected,as the arrangement servers, in order from the server apparatus 100 whoseapparatus number coincides with the converted identification number. Theinformation on the arrangement servers that are selected by theselection section 302 is stored in the storage area of the storagesection 103, and the like.

The transmission and reception section 303 performs bidirectionalcommunication with the link processing section 102 of another serverapparatus 100. For example, when the number of replicas for an arbitrarydata is acquired by the acquisition section 301, the transmission andreception section 303 transmits the acquired number of replicas to allthe server apparatuses 100 configuring the data distribution system 200.Further, the transmission and reception section 303 transmits therequest 120 to each of the server apparatuses 100 that are selected, bythe selection section 302, as the arrangement servers and as many as thenumber of replicas. Further, the transmission and reception section 303also serves to receive the number of replicas and the request 120 thatare transmitted from the link processing section 102 of another serverapparatus 100.

When a request of new write processing is inputted as the request 120for an arbitrary data, the setting section 304 sets a pre-given value asthe number of replicas of the data. In the case of new write processing,the number of replicas is not decided and is not be able to acquiredfrom the storage section 103. Therefore, an initial value set beforehandby the manager of the data distribution system 200 can be set as thenumber of replicas. Note that even if the number of replicas unsuitablefor the data access contents is set at this time, the setting has noadverse effect on the processing efficiency because the number ofreplicas is dynamically changed by the determination section 307, aswill be described below.

Note that also in the case where the number of replicas for an arbitrarydata is set by the setting section 304, the selection section 302, aswell as the transmission and reception section 303, perform theselection of the arrangement server, and the transmission of the numberof replicas and the request 120, similarly to the case where the numberof replicas is set by the acquisition section 301.

When the request 120 of the update processing (includes new writeprocessing) is inputted, and when the number of replicas for thearbitrary data is set by the setting section 304, the decision section305 decides whether or not the number of replicas is equal to the totalnumber of the server apparatuses 100 in the server apparatus 100 group.When it is decided by the decision section 305 that the number ofreplicas is equal to the total number of the server apparatuses 100 inthe server apparatus 100 group, the transmission and reception section303 transmits the request 120 representing the request of updateprocessing of the arbitrary data to all the server apparatuses 100 inthe server apparatus 100 group.

Further, when it is decided by the decision section 305 that the numberof replicas is not equal to the total of the server apparatuses 100 inthe server apparatus 100 group, the server apparatuses 100, in which thedata is to be arranged and which are as many as the number of replicas,are selected from the server apparatuses 100 in the server apparatus 100group by the selection section 302 using the algorithm described above.Then, the transmission and reception section 303 transmits the request120 representing the update processing for the data to each of theserver apparatuses 100 that are selected by the selection section 302and as many as the number of replicas.

Note that when a request of reference processing is inputted as therequest 120 for a certain data, the transmission and reception section303 may transmit the request 120 representing the request of referenceprocessing to one of the server apparatuses 100 that are selected by theselection section 302 and as many as the number of replicas.

Further, when the execution section 306 receives the request 120 via thetransmission and reception section 303 from its own server apparatus oranother server apparatus, the execution section 306 performs processingaccording to the request 120. Therefore, when receiving the updaterequest, the execution section 306 performs the update processing, whilewhen receiving the reference request, the execution section 306 performsthe reference processing. Note that when receiving the update request asthe request 120, the execution section 306 is set in a standby stateafter finishing the update processing. On the other hand, when receivingthe reference request as the request 120, the execution section 306returns the result of the reference processing performed to the objectdata to the server apparatus 100 as the transmission source of therequest 120 via the transmission and reception section 303.

This is because when seen from the server apparatus 100 to which therequest 120 is assigned, the processing is performed under theassumption that the execution of the request 120 is performed in theserver apparatus itself. Therefore, when the result of the referenceprocessing is not returned to the server apparatus 100 as thetransmission source of the processing request, it is continuouslydecided in the server apparatus 100 with the request 120 assignedthereto that the request for the processing is not performed. Thus, theoccurrence of such state can be prevented by returning the result of thereference.

Further, the server apparatus 100 may include a function to autonomouslydetermine the number of replicas in the server apparatus itself. Thedetermination section 307 is capable of determining the number ofreplicas of each data at each arbitrary time with reference to therequest 120 performed to the each data by the execution section 306.

Therefore, even when the number of replicas differs from the currentlyset number of replicas is determined by the determination section 307,the transmission and reception section 303 transmits the new number ofreplicas to all of the server apparatuses 100. The selection section 302of each of the server apparatuses 100 selects the arrangement servers onthe basis of the transmitted new number of replicas. The executionsection 306 writes the object data in the storage section 103, when itsown server apparatus 100 is newly selected as the arrangement server bythe selection section 302. On the other hand, the execution section 306erases the object data from the storage section 103, when its own serverapparatus 100 is no longer newly selected by the selection section 302as the arrangement server of the object data, that is, excluded from theselection of the arrangement server.

There is listed, for example, a method in which there are obtainedaverage values of the processing time of the object data in the caseswhere the number of replicas of the object data is set to the totalnumber of the server apparatuses 100 of the server apparatus 100 group,and where the number of replicas of the object data is set to 1, and inwhich the number of replicas is determined by the comparison between theobtained average values. As a result of the comparison, when the formeris smaller than the latter, the total number of the server apparatuses100 of the server apparatus 100 group can be determined as the number ofreplicas, while when the latter is smaller than the former, the minimumvalue, which can be set as the number of replicas, can be determined asthe number of replicas.

As described above, in the server apparatus 100 according to the presentembodiment, even when the request 120 received by the load balancer 110is assigned to any of the server apparatuses 100 in the datadistribution system 200, the arrangement destinations of the object dataof the request 120 can be decided according to the number of replicasset in the object data. Therefore, even when the request 120 of anycontent is received, the data can be efficiently distributed byselecting the arrangement servers according to the number of replicas.In the following, specific operations of the server apparatus 100 havingthe above described functions will be successively described byseparating the operations into the operation at the time of data updateprocessing and the operation at the time of data reference processing.

(Data Update Processing)

First, there will be described the data update processing in the serverapparatus 100. FIG. 4 is an illustration showing the data updateprocessing in the server apparatus. With reference to FIG. 4, there willbe described a procedure by which the link processing section 102 ofeach of the server apparatuses 100 accesses to object data according tothe number of replicas set for each of the data.

First, the load balancer 110 assigns the update processing of the objectdata (writing of new data, writing to arranged data, erasing of arrangeddata) to one of the server apparatuses 100 (the server apparatus 100-1in FIG. 4). The link processing section 102 determines the arrangementserver of the data according to a predetermined algorithm.

Here, there is described the procedure to determine the arrangementserver. FIG. 5 is a flow chart showing the procedure of arrangementserver selection processing. In the flow chart shown in FIG. 5, the linkprocessing section 102 first acquires the number of replicas newlydetermined or updated (operation S501). Then, the link processingsection 102 decides whether or not the acquired number of replicas isequal to the (total) number of the server apparatuses 100 (operationS502). Here, the number of the server apparatuses 100 that is comparedwith the number of replicas means the total number of the serverapparatuses 100 to which the request 120 is set to be assigned by theload balancer 110. Therefore, the number of the server apparatuses 100is set to n in the example shown in FIG. 1 or FIG. 4.

When deciding in operation S502 that the number of replicas is equal tothe number of servers (operation S502: Yes), the link processing section102 is required to transmit the update request to all the serverapparatuses 100. Thus, the link processing section 102 determines allthe server apparatuses 100 as the arrangement server (operation S503),and ends a series of arrangement server selection processing.

On the other hand, when deciding in operation S502 that the number ofreplicas is not equal to the number of server apparatuses 100 (operationS502: No), the link processing section 102 shifts to processing todetermine the arrangement servers as many as the number of replicas fromall the server apparatuses 100. First, the link processing section 102calculates a hash value of the object data (operation S504). Then, thelink processing section 102 decides whether or not the number ofreplicas is 1 (operation S505).

When deciding in operation S505 that the number of replicas is equal to1 (operation S505: Yes), the link processing section 102 obtains aremainder at the time of dividing the calculated hash value by the(total) number of the servers, and selects the server apparatus 100whose apparatus number coincides with the remainder, as an arrangementserver (operation S506), so as to end a series of processing. On theother hand, when deciding in operation S505 that the number of replicasis not equal to 1 (operation S505: No), the link processing section 102obtains a remainder at the time of dividing the calculated hash value bythe (total) number of the servers similarly to operation S506, andselects, as the arrangement servers, the server apparatuses 100 as manyas the number of replicas in order from the server apparatus 100 whoseapparatus number coincides with the remainder (operation S507), so as toend a series of processing.

Specifically, in the processing in operation S506 and operation S507,the link processing section 102 obtains, for example, a remainder (odd)by dividing the hash value by the number of servers. Then, when thenumber of replicas=1, the link processing section 102 selects the serverapparatus 100 whose apparatus number is set to the odd, as thearrangement server as in operation S506. When the number of replicas=m(1<m<n), the link processing section 102 selects the m serverapparatuses 100 whose apparatus numbers are respectively set to odd,odd+1, . . . , odd+m−1, as arrangement servers as in operation S507.

Next, returning to FIG. 4, there will be described update processingpatterns (1) and (2). When determining the arrangement server, the linkprocessing section 102 is then required to transmit the received updaterequest to the arrangement server. At this time, the link processingsection 102 is required to perform the update processing of pattern (1)in which the write processing is performed according to the updaterequest in the case in which its own server apparatus is the arrangementserver, and the update processing of pattern (2) in which the writeprocessing is performed to the arrangement server other than its ownserver apparatus according to the update request.

FIG. 6A is a flow chart showing a procedure of data update processing(in the case of the server apparatus which has received the updaterequest from its own application execution section). In the flow chartshown in FIG. 6A, the link processing section 102 decides whether or notit has received the update request from the application executionsection 101 of its own server apparatus (operation S611). Here, the linkprocessing section 102 is set in a standby state until it receives theupdate request (operation S611: loop of No). When receiving the updaterequest (operation S611: Yes), the link processing section 102 performsthe arrangement server selection processing (operation S612).

Next, with reference to the result of the arrangement server selectionprocessing in operation S612, the link processing section 102 decideswhether or not its own server apparatus is the arrangement server(operation S613). Here, when deciding that its own server apparatus isthe arrangement server (operation S613: Yes), the link processingsection 102 updates the object data according to the data update request(operation S614), and transmits the update request to anotherarrangement server (operation S615), so as to end a series ofprocessing. Note that when deciding that its own server apparatus is notthe arrangement server in operation S613 (operation S613: No), the linkprocessing section 102 shifts to operation S615 without performing theupdate request in operation S614, and transmits the update request toanother arrangement server (operation S615), so as to end a series ofprocessing.

Then, when the update request is transmitted, as in operation S615, toanother server apparatus 100 determined as the arrangement server,further processing needs to be performed in the transmission destinationserver apparatus 100 (the server apparatus 100-n in the case of FIG. 4).FIG. 6B is a flow chart showing a procedure of the data updateprocessing (in the case of the server apparatus that has received theupdate request from the link processing section of another serverapparatus). In the flow chart shown in FIG. 6B, the link processingsection 102 first decides whether or not the update request is receivedfrom another server apparatus 100 (operation S621). Here, the linkprocessing section 102 waits until the update request is received(operation S621: loop of No). When deciding that the update request isreceived (operation S621: Yes), the link processing section 102 updatesthe object data according to the update request (operation S622), so asto end a series of processing.

(Data Reference Processing)

Next, there will be described the data reference processing in theserver apparatus 100. FIG. 7 is an illustration showing the datareference processing in the server apparatus. Also in FIG. 7, thefollowing description will be given under the assumption that therequest 120 (reference request) is assigned to the server apparatus100-1. The link processing section 102 determines the arrangement serverof the data according to a predetermined algorithm similarly to the caseof the update processing (see FIG. 5).

When determining the arrangement server, the link processing section 102transmits the received reference request to the arrangement server. Atthis time, the link processing section 102 is required to perform theprocessing of pattern (1) in which the link processing section 102performs the read processing according to the reference request in thecase where its own server apparatus is the arrangement server, and theprocessing of pattern (2) in which the link processing section 102transmits the reference request to the arrangement server other than itsown server apparatus, and in which, upon receipt of the transmittedrequest, another server apparatus 100 performs the read processingaccording to the reference request. Further, in the case of the abovedescribed processing of pattern (2), the server apparatus 100-n with thereference request transmitted thereto is required to transmit thereference result to the transmission source server apparatus 100-1.Thus, in the following, there will be described the processing in eachof pattern (1) and pattern (2).

FIG. 8A is a flow chart showing the data reference processing procedure(in the case of the server apparatus having received the referencerequest from its own application execution section). In the flow chartshown in FIG. 8A, the link processing section 102 first decides whetheror not it has received the request 120 (reference request) from theapplication execution section 101 of its own server apparatus (operationS811). Here, the link processing section 102 is set in a standby stateuntil it receives the data reference request (operation S811: loop ofNo). When receiving the data reference request (operation S811: Yes),the link processing section 102 performs the arrangement serverselection processing (operation S812).

Next, the link processing section 102 decides whether or not the numberof replicas of the object data is 1 (operation S813). Then, when thenumber of replicas is set to 1 (operation S813: Yes), the linkprocessing section 102 determines the server apparatus 100, which isdetermined as the arrangement server by the arrangement server selectionprocessing in operation S812, as the reference server to which the linkprocessing section 102 performs the data reference processing accordingto the reference request (operation S814). That is, this means thatthere is no server apparatus 100 with the object data arranged thereinother than the determined arrangement server.

On the other hand, when the number of replicas is set to a value otherthan 1 (operation S813: No), the link processing section 102 determinesone of the server apparatuses 100, which are determined as thearrangement servers by the arrangement server selection process inoperation S812, as a reference server to which the link processingsection 102 performs the data reference processing according to thereference request (operation S815).

When determining the reference server, the link processing section 102next decides whether or not its own server apparatus is the arrangementserver determined in operation S812 (operation S816). Here, whendeciding that its own server apparatus is the arrangement server(operation S816: Yes), the link processing section 102 refers to theobject data arranged in the storage section 103 of its own serverapparatus (operation S817), so as to end a series of processing. On theother hand, when deciding that its own server apparatus is not thearrangement server (operation S816: No), the link processing section 102transmits the reference request to the reference server (operationS818), so as to end a series of processing.

When the reference request is transmitted, as in operation S818, toanother server apparatus 100 determined as the reference server, thetransmission destination server apparatus 100 (the server apparatus100-n in the case of FIG. 7) is then required to perform furtherprocessing. FIG. 8B is a flow chart showing a procedure of datareference processing (in the case of the server apparatus havingreceived the reference request from the link processing section ofanother server apparatus).

In the flow chart shown in FIG. 8B, the link processing section 102 ofanother server apparatus 100 first decides whether or not the referencerequest is received from the link processing section 102 of anotherserver apparatus 100 (operation S821). Here, the link processing section102 waits until the reference request is received (operation S821: loopof No). When deciding that the reference request is received (operationS821: Yes), the link processing section 102 refers to the object dataaccording to the reference request (operation S822), and transmits thereference result to the server apparatus 100 as the transmission sourceof the reference request (operation S823), so as to end a series ofprocessing.

(Data Rearrangement Processing at Change of the Number of Replicas)

Next, there will be described the data rearrangement processing when thenumber of replicas is changed. The server apparatus 100 according to thepresent embodiment is required to perform the processing of newlyarranging the object data in the storage section 103 according to thechange in the number of replicas, or to perform the processing oferasing the object data arranged in the storage section 103. In thefollowing, there will be described the contents of the processing ofeach of the cases.

FIG. 9 is a flow chart showing the data rearrangement processing whenthe number of replicas is changed. In the flow chart shown in FIG. 9,the link processing section 102 first decides whether or not apredetermined time has elapsed (operation S901). Here, the linkprocessing section 102 waits until the predetermined time elapses(operation S901: loop of No). When the predetermined time elapsed(operation S901: Yes), the link processing section 102 performs theprocessing to determine the number of replicas (operation S902).

Note that in operation S901, the link processing section 102 performsprocessing to decide the update timing of the number of replicas on thebasis of time. As already described, the update timing can bearbitrarily and freely set. Therefore, the link processing section 102may set the update timing on the basis of the number of processing, forexample, on the basis of such decision of whether or not a predeterminednumber of times of processing requests are assigned to a specific dataor its own server apparatus.

Further, in the processing to determine the number of replicas inoperation S902, the link processing section 102 may use various accesspattern analysis tools or receive a setting from the manager. Further,the link processing section 102 may autonomously determine the number ofreplicas by a procedure as will be described below.

When determining the number of replicas, the link processing section 102next decides whether or not the number of replicas is changed by thedetermination in operation S902 (operation S903). Here, when the numberof replicas is not changed (operation S903: No), the number of thearrangement servers is not changed, and hence the link processingsection 102 ends a series of processing without performing any furtherprocessing.

On the other hand, when the number of replicas is changed (operationS903: Yes), the link processing section 102 transmits the information onthe changed number of replicas to another server apparatus 100(operation S904). Further, the link processing section 102 decideswhether or not the number of replicas is increased by the change(operation S905). When the number of replicas is increased (operationS905: Yes), the link processing section 102 performs the datarearrangement processing at the time of increase in the number ofreplicas (operation S906). When the number of replicas is not increased(operation S905: No), that is, when the number of replicas is decreased,the link processing section 102 performs the data rearrangementprocessing at the time of decrease in the number of replicas (operationS907). After performing such processing, the link processing section 102ends a series of processing.

(Processing at the Time of Increase in the Number of Replicas)

First, there will be described the processing when the number ofreplicas is increased. FIG. 10 is a flow chart showing the datarearrangement processing when the number of replicas is increased. Inthe flow chart shown in FIG. 10, the link processing section 102 firstperforms the arrangement server selection processing by using the newlychanged number of replicas (operation S1001). The arrangement serverselection processing performed in operation S1001 is the arrangementserver selection processing described with reference to FIG. 5. It isassumed that the arrangement servers selected in operation S1001 are setas the new arrangement servers.

Next, the link processing section 102 decides whether or not the oldnumber of replicas which is set for the object data is equal to 1(operation S1002). Here, when deciding that the old number of replicas=1(operation S1002: Yes), since the old arrangement server determined onthe basis of the old number of replicas is surely determined as the newarrangement server, the link processing section 102 determines thisarrangement server as the data transmission source server (operationS1003). The data transmission source server means the server apparatus100 that transmits the object data to the server apparatus 100 newlyadded as the arrangement server, and in which the master data isarranged.

On the other hand, when deciding that the old number of replicas is notequal to 1 (operation S1002: No), the link processing section 102determines, as the data transmission source, one of the old arrangementservers determined as the arrangement servers on the basis of the oldnumber of replicas (operation S1004). Also here, when the number ofreplicas is increased, since the arrangement servers determined on thebasis of the old number of replicas are surely included in thearrangement servers determined on the basis of the new number ofreplicas, the link processing section 102 may only determine one of theold arrangement servers as the data transmission source.

Then, the link processing section 102 decides whether or not its ownserver apparatus is the data transmission source (operation S1005). Whendetermining its own server apparatus as the data transmission source(operation S1005: Yes), the link processing section 102 transmits theobject data to the server apparatus 100 that is newly determined as thearrangement server (operation S1006), so as to thereby end a series ofprocessing. On the other hand, when determining that its own serverapparatus is not the data transmission source (operation S1005: No), thelink processing section 102 ends a series of processing withoutperforming any further processing. In this case, its own serverapparatus needs not perform any further processing because the serverapparatus 100 determined as the data transmission source performs thedata arrangement.

(Processing at the Time of Decrease in the Number of Replicas)

Next, there will be described the processing at the time when the numberof replicas is decreased. FIG. 11 is a flow chart showing the datarearrangement processing at the time when the number of replicas isdecreased. In the flow chart shown in FIG. 11, the link processingsection 102 first performs the arrangement server selection processingby using the old number of replicas (operation S1101). The arrangementserver selection processing performed in operation S1101 is thearrangement server selection processing described with reference to FIG.5.

With reference to the arrangement server selection processing inoperation S1101, the link processing section 102 decides whether or notits own server apparatus is the arrangement server based on the oldnumber of replicas (operation S1102). Here, when deciding that its ownserver apparatus is not the arrangement server (operation S1102: No),the object data, the number of replica of which is changed at this time,is not arranged in its own server apparatus, and hence the linkprocessing section 102 ends a series of processing without performingany further processing.

On the other hand, when deciding in operation S1102 that its own serverapparatus is the arrangement server (operation S1102: Yes), the linkprocessing section 102 performs at this time the arrangement serverselection process by using the new number of replicas (operation S1103).Then, with reference to the arrangement server selection processing inoperation S1103, the link processing section 102 decides whether or notits own server apparatus is the arrangement server based on the newnumber of replicas (operation S1104).

When deciding in operation S1104 that its own server apparatus is thearrangement server based on the new number replicas (operation S1104:Yes), the link processing section 102 ends a series of processingwithout performing any further processing because the object dataarranged in its own server apparatus is held. On the other hand, whendeciding that its own server apparatus is not the arrangement serverbased on the new number replicas (operation S1104: no), the linkprocessing section 102 erases the object data arranged in its own serverapparatus (operation S1105), so as to end a series of processing withoutperforming any further processing.

In this way, the server apparatus 100 according to the presentembodiment is capable of efficiently arranging the object data incorrespondence with a dynamic change in the number of replicas.

(Determination Processing of the Number of Replicas)

Next, there will be described the determination processing of the numberof replicas. As described above, the setting method of the number ofreplicas in the server apparatus 100 according to the present embodimentis not uniform. For example, there may be used a method in which theaccess pattern is analyzed by the manager of the data distributionsystem 200 and in which the number of replicas for each data is set onthe basis of the analysis result, or a method in which a tool foranalyzing the access pattern is prepared and in which the number ofreplicas is set on the basis of the analysis result obtained by usingthe tool.

However, it is possible to reduce the burden of the manager by providingto the server apparatus 100 a function to autonomously determine thenumber of replicas. Therefore, here, there will be described a specificexample at the time when the number of replicas is automaticallydetermined by the link processing section 102 of each of the serverapparatuses 100.

The link processing section 102 of the server apparatus 100 calculatesthe performance in the data access processing of each data inconsideration of the ratio of reference and update of a certain data(contents of access to the data). The information used in thecalculation processing includes the number of replicas, the write timeto the storage section 103 or the read time from the storage section103, and the communication time between the server apparatuses 100. Inthe environment in which the ratio of reference and update requests ischanged, the link processing section 102 is required to periodicallycalculate the performance by using the ratio of the reference and updaterequests at each period, and to determine the number of replicas so asto maximize the performance. In the following, there will be described aprocedure to determine the number of replicas by using the abovedescribed information.

First, there are listed variables used in the following description.

Update ratio: W [%]

Reference ratio: R [%]

The number of servers: N [integer]

The number of replicas: r (integer r>0)

Communication time between server apparatuses: Tt [sec]

Write time: Tw [sec]

Read time: Tr [sec]

Average latency at the time of update: Lw

Average latency at the time of reference: Lr

First, the link processing section 102 counts the reference and updaterequests made to each of data at a certain fixed time interval, andobtains the reference ratio R and the update ratio W for each of thedata. Specifically, in the case in which during one hour, the referenceprocessing is performed 180 times and the update processing is performed20 times, the reference ratio is obtained as R=90 [%] and the updateratio is obtained as W=10 [%]. Note that here, the reference ratio R andthe update ratio W are obtained, as examples, from the numbers of thereference and update requests generated at the fixed time interval,respectively. However, the reference ratio R and the update ratio W mayalso be obtained on the basis of each of the numbers of the referenceand update requests included in a certain number of generated requests.For example, in the case where among the total 100 times of requests,the number of times of the reference request is 90 and the number oftimes of the reference update is 10, the ratios are respectivelyobtained as R=90 [%] and W=10 [%].

Next, simultaneously with the calculation of the reference ratio R andthe update ratio W, as described above, the link processing section 102calculates the average latency of each of the data reference and thedata update in correspondence with the number of replicas r, anddetermines the number of replicas so as to minimize the average latency.In the following, a procedure to determine the number of replicas willbe described in detail with reference to FIGS. 12 and 13.

Note that the communication time Tt between the server apparatuses 100,the write time Tw, and the read time Tr may be respectively obtained byaveraging a certain number of actually measured values. Alternatively,the values of the communication time Tt between the server apparatuses100, the write time Tw, and the read time Tr may also be individuallymeasured. When these values are known beforehand in such cases where thevalues are given beforehand as a specification, or where the values aredisclosed as test values, these known values may also be used. Here, themeans for obtaining these values is not limited in particular, and themanager of the data distribution system 200 can suitably select themeans. Further, it is assumed that when the update request istransmitted from one server apparatus to a plurality of the other serverapparatuses, the transmission and the actual update request aresuccessively performed.

(Average Latency at the Time of Data Update)

First, there will be described the average latency at the time of dataupdate. FIG. 12 is an illustration showing the latency calculationprocedure at the time of data update. As shown in FIG. 12, the linkprocessing section 102 is required to calculate the average latency atthe time of data update in consideration of the latency in each of thecases in which its own server apparatus is determined as the arrangementserver, and in which its own server apparatus is not the arrangementserver.

First, when the server apparatus 100 that has received the updaterequest is the arrangement server of the object data (the serverapparatus itself=the arrangement server), the transmission destinationof the data update request is the (r−1) remote server apparatuses 100other than the server apparatus itself, and hence the update processingis actually performed in the n server apparatuses 100 including theserver apparatus itself. Thus, the latency Lwa in this case can beobtained by following formula (1).

Lwa=r*Tw+(r−1)*Tt   (1)

On the other hand, when the server apparatus 100 that has received theupdate request is not the arrangement server of the object data (theserver apparatus itself≠the arrangement server), the transmissiondestination of the data update request is the r remote serverapparatuses 100 other than the server apparatus itself, and hence theactual update processing is also performed in the r server apparatuses.Therefore, the latency Lwb in this case can be obtained by followingformula (2).

Lwb=r*(Tw+Tt)   (2)

Further, the probability that the server apparatus 100 that has receivedthe update request is the arrangement server of the object data is givenby r/N, while the probability that the server apparatus 100 that hasreceived the update request is not the arrangement server of the objectdata is given by (N−r)/N. Thus, the average latency Lw at the time ofupdate is obtained by following formula (3).

$\quad\begin{matrix}\begin{matrix}{{Lw} = {{{Lwa}*{r/N}} + {{Lwb}*{\left( {N - r} \right)/N}}}} \\{= {\left\{ {{r*{Tw}} + {\left( {r - 1} \right)*{Tt}}} \right\}*}} \\{{{r/N} + {r*\left( {{Tt} + {Tw}} \right)*{\left( {N - r} \right)/N}}}}\end{matrix} & (3)\end{matrix}$

(Average Latency at the Time of Data Reference)

Next, there will be described the average latency at the time of datareference. FIG. 13 is an illustration showing a procedure to calculatethe latency at the time of data reference. As shown in FIG. 13, the linkprocessing section 102 is also required to calculate the average latencyat the time of data reference in consideration of the latency in each ofthe cases in which its own server apparatus is determined as thearrangement server, and in which its own server apparatus is not thearrangement server.

First, in the case in which the server apparatus that has received thereference request is the arrangement server of the object data (theserver apparatus itself=the arrangement server), the latency is only thereference processing time in the server apparatus itself because thereceived data reference processing needs not to be transmitted toanother server apparatus 100. Therefore, the latency Lra in this case isobtained by the following formula (4).

Lra=Tr   (4)

On the other hand, in the case in which the server apparatus that hasreceived the reference request is not the arrangement server of theobject data (the server apparatus itself≠the arrangement server), thelink processing section 102 of the server apparatus transmits the datareference processing to one of the server apparatuses 100 set as thearrangement servers, so that the reference process is performed in thetransmission destination server apparatus 100. Therefore, the latencyLrb in this case is obtained by the following formula (5).

Lrb=Tr+Tt   (5)

Also in the case of reference processing, the probability that theserver apparatus 100 that has received the reference request is thearrangement server of the object data is given by r/N, while theprobability that the server apparatus 100 that has received thereference request is not the arrangement server of the object data isgiven by (N−r)/N. Thus, the average latency Lr at the time of referenceis obtained by the following formula (6).

$\quad\begin{matrix}\begin{matrix}{{Lr} = {{{Lwa}*{r/N}} + {{Lwb}*{\left( {N - r} \right)/N}}}} \\{= {{{Tr}*{r/N}} + {\left( {{Tt} + {Tr}} \right)*{\left( {N - r} \right)/N}}}}\end{matrix} & (6)\end{matrix}$

As described above, the data reference ratio R and the data update ratioW are obtained by performing the above described monitoring for a fixedtime. Thus, by using the ratios, the average latency L in the case inwhich the number of replicas is r, can be obtained by the followingformula (7).

$\quad\begin{matrix}\begin{matrix}{L = {{{Lw}*{W/100}} + {{Lr}*{R/100}}}} \\{= {\left\{ {{\left\{ {{r*{Tw}} + {\left( {r - 1} \right)*{Tt}}} \right\}*{r/N}} + {r*\left( {{Tt} + {Tw}} \right)*{\left( {N - r} \right)/N}}} \right\}*}} \\{{{W/100} + {\left\{ {{{Tr}*{r/N}} + {\left( {{Tt} + {Tr}} \right)*{\left( {N - r} \right)/N}}} \right\}*{R/100}}}}\end{matrix} & (7)\end{matrix}$

The above described formula used to obtain the average latency L is alinear expression of the number of replicas r. Thus, the average latencyL is minimized in one of the cases in which the number of replicas r=1,and in which the number of replicas r=the number of server apparatusesN. Therefore, the link processing section 102 calculates only theaverage latency L1 at the time when r=1, and the average latency LN atthe time when r=N, so as to set, as the new number of replicas, thenumber of replicas that minimizes the average latency. That is, all theaverage latencies are not calculated for all of r ranging from 1 to N,and the number of replicas can be uniquely determined by onlycalculating the average latencies in the cases where r=1 and where r=N.

-   -   When L1<LN, the number of replicas is set to 1.    -   When L1>LN, the number of replicas is set to N.

Note that when it is set during actual operation of the datadistribution system 200 that the number of replicas=1, the setting maynot be desirable from a viewpoint of availability. Therefore, there mayalso be used a method in which, when it is determined that the number ofreplicas is set to 1; the number of replicas is set to a minimum numberof replicas that is set beforehand by the manager of the datadistribution system 200.

As described above, according to the present embodiment, by monitoringnot only the data reference frequency but also the data updatefrequency, it is also possible to detect the case where the processingefficiency is on the contrary lowered by the increase in the number ofreplicas. In such case, the lowering of the update processing efficiencycan be prevented by erasing unnecessary replicas. Further, according tothe present embodiment, the optimum number of replicas can beindividually set for each data without being influenced by the number ofreplicas of another data, so that the data can be efficiently arranged.

Note that the data processing method described as the present embodimentcan be realized in such a manner that a program prepared beforehand isexecuted by a computer, such as a personal computer and a workstation.The program is recorded in a computer-readable recording medium, such asa hard disk, a flexible disk, a CD-ROM, an MO and a DVD, and is executedby being read from the recording medium by the computer. Further, theprogram may be a medium that can be distributed via a network, such asthe Internet.

Further, the server apparatus 100 described as the present embodimentcan also be realized by an application specific integrated circuit(hereinafter simply referred to as “ASIC”), such as a standard cell anda structured ASIC, and a programmable logic device (PLD) such as anFPGA. Specifically, for example, the server apparatus 100 can bemanufactured in such a manner that the above described functions (theacquisition section 301 to the determination section 307) of the linkprocessing section 102 of the server apparatus 100 is defined by HDLdescriptions, and that the HDL descriptions are logically synthesized,so as to be written in the ASIC and PLD.

All examples and conditional language recited herein are intended forpedagogical purposes to aid the reader in understanding the inventionand the concepts contributed by the inventor to furthering the art, andare to be construed as being without limitation to such specificallyrecited examples and conditions, nor does the organization of suchexamples in the specification relate to a showing of the superiority andinferiority of the invention. Although the embodiment(s) of the presentinventions have been described in detail, it should be understood thatthe various changes, substitutions, and alterations could be made heretowithout departing from the spirit and scope of the invention.

1. A computer-readable recording medium storing a data processingprogram that causes a computer of a group of mutually communicablecomputers to execute: an acquisition procedure configured, when aprocessing request for an arbitrary data is inputted, to acquire anumber of replicas set in the arbitrary data; a selection procedureconfigured to select computers, which serve as arrangement destinationsof the arbitrary data and are as many as the number of replicas, fromthe computers of the computer group by using a predetermined algorithm;a transmission procedure of the number of replicas, configured totransmit the number of replicas of the arbitrary data, the number beingacquired by the acquisition procedure, to all the computers of thecomputer group; and a processing request transmission procedureconfigured to transmit the processing request to each of the computersthat are selected by the selection procedure and as many as the numberof replicas.
 2. The computer-readable recording medium according toclaim 1, the program further causing the computer to execute: a settingprocedure configured to set a preset value as the number of replicas ofthe arbitrary data when a new write processing request of the arbitrarydata is inputted as the processing request of the arbitrary data,wherein the selection procedure selects computers, which serve as thearrangement destinations of the arbitrary data and are as many as thenumber of replicas, from the computers in the computer group by using apredetermined algorithm, when the number of replicas of the arbitrarydata is set by the setting procedure, wherein the transmission procedureof the number of replicas transmits, to the computer group, the numberof replicas of the arbitrary data, the number being set by the settingprocedure, and wherein the processing request transmission proceduretransmits the new write processing request of the arbitrary data to eachof the computers that are selected by the selection procedure and asmany as the number of replicas.
 3. The computer-readable recordingmedium according to claim 2, the program further causing the computer toexecute: a decision procedure to decide whether or not the number ofreplicas is equal to the total number of computers of the computer groupwhen the number of replicas of the arbitrary data is set by the settingprocedure, wherein when it is decided by the decision procedure that thenumber of replicas is equal to the total number of computers of thecomputer group, the processing request transmission procedure transmitsthe new write processing request of the arbitrary data to all thecomputers of the computer group.
 4. The computer-readable recordingmedium according to claim 3, wherein the decision procedure decideswhether or not the number of replicas is equal to the total number ofcomputers of the computer group when a write processing request for thearbitrary data arranged in any of the computers of the computer group isinputted as the processing request for the arbitrary data, wherein whenit is decided by the decision procedure that the number of replicas isnot equal to the total number of computers of the computer group, theselection procedure selects computers, in which the arbitrary data isarranged and which are as many as the number of replicas, from thecomputers of the computer group by using the predetermined algorithm,and wherein the processing request transmission procedure transmits thewrite processing request for the arbitrary data to each of the computersthat are selected by the selection procedure and as many as the numberof replicas.
 5. The computer-readable recording medium according toclaim 1, wherein the processing request transmission procedure transmitsthe reference processing request for the arbitrary data to one of thecomputers that is selected by the selection procedure and as many as thenumber of replicas when a reference processing request for the arbitrarydata arranged in any of the computers of the computer group is inputtedas the processing request for the arbitrary data.
 6. Thecomputer-readable recording medium according to claim 2, wherein theprocessing request transmission procedure transmits the referenceprocessing request for the arbitrary data to one of the computers thatis selected by the selection procedure and as many as the number ofreplicas when a reference processing request for the arbitrary dataarranged in any of the computers of the computer group is inputted asthe processing request for the arbitrary data.
 7. The computer-readablerecording medium according to claim 3, wherein the processing requesttransmission procedure transmits the reference processing request forthe arbitrary data to one of the computers that is selected by theselection procedure and as many as the number of replicas when areference processing request for the arbitrary data arranged in any ofthe computers of the computer group is inputted as the processingrequest for the arbitrary data.
 8. The computer-readable recordingmedium according to claim 4, wherein the processing request transmissionprocedure transmits the reference processing request for the arbitrarydata to one of the computers that is selected by the selection procedureand as many as the number of replicas when a reference processingrequest for the arbitrary data arranged in any of the computers of thecomputer group is inputted as the processing request for the arbitrarydata.
 9. The computer-readable recording medium according to claim 1,the program further causing the computer to execute: an executionprocedure to execute processing corresponding to the processing requestwhen a processing request is received from the computer itself or fromanother computer.
 10. The computer-readable recording medium accordingto claim 2, the program further causing the computer to execute: anexecution procedure to execute processing corresponding to theprocessing request when a processing request is received from thecomputer itself or from another computer.
 11. The computer-readablerecording medium according to claim 3, the program further causing thecomputer to execute: an execution procedure to execute processingcorresponding to the processing request when a processing request isreceived from the computer itself or from another computer.
 12. Thecomputer-readable recording medium according to claim 4, the programfurther causing the computer to execute: an execution procedure toexecute processing corresponding to the processing request when aprocessing request is received from the computer itself or from anothercomputer.
 13. The computer-readable recording medium according to claim9, wherein the execution procedure returns the result of the referenceprocessing executed to the arbitrary data according to the processingrequest to the computer as the transmission source of the processingrequest, when a reference processing request for the arbitrary data isreceived as the processing request.
 14. The computer-readable recordingmedium according to claim 9, the program further causing the computer toexecute: a determination procedure to determine the number of replicasof the arbitrary data by referring to the processing request for thearbitrary data, which processing request is executed by the executionprocedure; wherein when the number of replicas different from thecurrently set number of replicas is determined by the determinationprocedure, the transmission procedure of the number of replicastransmits the determined number of replicas to all the computers of thecomputer group, wherein, when the determined number of replicas istransmitted by the transmission procedure of the number of replicas, theselection procedure selects the computers, in which the arbitrary datais to be arranged and which are as many as the number of replicas, fromthe computers of the computer group according to a predeterminedalgorithm, and wherein, when the computer itself is selected by theselection procedure as the computer with the arbitrary data to be newlyarranged therein, the execution procedure writes the arbitrary data tothe computer itself, while when the computer itself is no longerselected by the selection procedure as the computer with the arbitrarydata to be newly arranged therein, the execution procedure erases thedata.
 15. The computer-readable recording medium according to claim 13,the program further causing the computer to execute: a determinationprocedure to determine the number of replicas of the arbitrary data byreferring to the processing request for the arbitrary data, whichprocessing request is executed by the execution procedure; wherein, whenthe number of replicas different from the currently set number ofreplicas is determined by the determination procedure, the transmissionprocedure of the number of replicas transmits the determined number ofreplicas to all the computers of the computer group, wherein, when thedetermined number of replicas is transmitted by the transmissionprocedure of the number of replicas, the selection procedure selects thecomputers, in which the arbitrary data is to be arranged and which areas many as the number of replicas, from the computers of the computergroup according to a predetermined algorithm, and wherein, when thecomputer itself is selected by the selection procedure as the computerwith the arbitrary data to be newly arranged therein, the executionprocedure writes the arbitrary data to the computer itself, while whenthe computer itself is no longer selected by the selection procedure asthe computer with the arbitrary data to be newly arranged therein, theexecution procedure erases the data.
 16. The computer-readable recordingmedium according to claim 14, wherein the determination proceduredetermines the total number of computers of the computer group to be thenumber of replicas of the arbitrary data, in the case in which anaverage value of the processing time for the arbitrary data, when thenumber of replicas is set to the total number of computers of thecomputer group, is equal to or greater than an average value of theprocessing time for the arbitrary data which is processed by the numberof replicas.
 17. The computer-readable recording medium according toclaim 15, wherein the determination procedure determines the totalnumber of computers of the computer group to be the number of replicasof the arbitrary data, in the case in which an average value of theprocessing time for the arbitrary data, when the number of replicas isset to the total number of computers of the computer group, is equal toor greater than an average value of the processing time for thearbitrary data which is processed by the number of replicas.
 18. Thecomputer-readable recording medium according to claim 14, wherein thedetermination procedure determines a settable minimum value to be thenumber of replicas of the arbitrary data, in the case in which when thenumber of replicas of the arbitrary data is set to 1, an average valueof the processing time for the arbitrary data is less than apredetermined value.
 19. A server apparatus that is a computer andconstitutes a server apparatus group capable of communicating with eachother, the server apparatus comprising: an acquisition unit configured,when a processing request for an arbitrary data is inputted, to acquirea number of replicas set in the arbitrary data; a selection unitconfigured to select server apparatuses, which serve as arrangementdestinations of the arbitrary data and are as many as the number ofreplicas, from the server apparatuses of the server apparatus group byusing a predetermined algorithm; a transmission unit of the number ofreplicas, configured to transmit the number of replicas of the arbitrarydata, the number being acquired by the acquisition unit, to all theserver apparatuses of the server apparatus group; a processing requesttransmission unit configured to transmit the processing request to eachof the server apparatuses that are selected by the selection unit and asmany as the number of replicas; an execution unit configured, when theprocessing request transmitted from the server apparatus itself oranother server apparatus is received, to execute processingcorresponding to the processing request; and a determination unitconfigured to determine at each arbitrary time the number of replicas ofthe arbitrary data by referring to the processing request for thearbitrary data, which processing request is executed by the executionunit, wherein, when the number of replicas different from the currentlyset number of replicas is determined by the determination unit, thetransmission unit of the number of replicas transmits the determinednumber of replicas to all the server apparatuses of the server apparatusgroup, wherein, when the determined number of replicas is transmitted bythe transmission unit of the number of replicas, the selection unitnewly selects the server apparatuses, in which the arbitrary data is tobe arranged and which are as many as the determined number of replicas,from the server apparatuses of the server apparatus group according to apredetermined algorithm, wherein, when the server apparatus itself isselected by the selection unit as the server apparatus with thearbitrary data to be newly arranged therein, the execution unit performsthe writing of the arbitrary data, and wherein, when the serverapparatus itself is no longer selected by the selection unit as theserver apparatus with the arbitrary data to be newly arranged therein,the execution unit erases the data.
 20. A data processing method of acomputer that constitutes a group of computers communicable with eachother, the data processing method being configured to execute: anacquisition procedure configured, when a processing request for anarbitrary data is inputted, to acquire a number of replicas set in thearbitrary data; a selection procedure configured to select computers,which serve as arrangement destinations of the arbitrary data and are asmany as the number of replicas, from the computers of the computer groupby using a predetermined algorithm; a transmission procedure of thenumber of replicas, configured to transmit the number of replicas of thearbitrary data, the number being acquired by the acquisition procedure,to all the computers of the computer group; a processing requesttransmission procedure configured to transmit the processing request toeach of the computers which are selected by the selection procedure andas many as the number of replicas; an execution procedure configured,when the processing request transmitted from the computer itself oranother computer is received, to execute processing corresponding to theprocessing request; and a determination procedure configured todetermine at each arbitrary time the number of replicas of the arbitrarydata by referring to the processing request for the arbitrary data,which processing request is executed by the execution procedure,wherein, when the number of replicas different from the currently setnumber of replicas is determined by the determination procedure, thetransmission procedure of the number of replicas transmits thedetermined number of replicas to all the computers of the computergroup, wherein, when the determined number of replicas is transmitted bythe transmission procedure of the number of replicas, the selectionprocedure newly selects computers, in which the arbitrary data is to bearranged and which are as many as the determined number of replicas,from the computers of the computer group according to a predeterminedalgorithm, wherein, when the computer itself is selected by theselection procedure as the computer with the arbitrary data to be newlyarranged therein, the execution procedure performs the writing of thearbitrary data, and wherein, when the computer itself is no longerselected by the selection procedure as the computer with the arbitrarydata to be newly arranged therein, the execution procedure erases thedata.